import request from "@/utils/request";

const api = '/marketing-domain/'

// 数据用户营销拨打电话
export async function dataMarketingCallPhone(params) {
    return await request.get(api + 'dataMarketing/getPhone', {params})
}

// 其他营销拨打电话
export async function marketingCallPhone(params) {
    return await request.get('/user-domain/' + 'user/queryPhone', {params})
}

/**
 * 短信营销
 * **/
// 转换用户短信营销列表
export async function conversionList(params) {
    return await request.get(api + 'smsMarketing/conversionList', {params})
}

// 转化用户发送短信条数
export async function conversionTotal(params) {
    return await request.get(api + 'smsMarketing/conversionTotal', {params})
}

// 转换用户短信营销列表导出
export async function conversionListExport(params) {
    return await request.post(api + 'smsMarketing/conversionListExport', params)
}
// 转换用户批量编辑短信
export async function conversionBatchEditSms(params) {
    return await request.post(api + 'smsMarketing/conversionUpdate', params)
}
// 转换用户短信营销取消发送
export async function conversionCloseSmsSend(params) {
    return await request.post(api + 'smsMarketing/conversionSendBack', params)
}

// 转换用户发送短信
export async function conversionSmsSend(params) {
    return await request.post(api + 'smsMarketing/conversionSmsSend', params)
}

// 数据短信营销列表
export async function dataList(params) {
    return await request.get(api + 'smsMarketing/dataList', {params})
}

// 数据短信营销查询总条数
export async function dataTotal(params) {
    return await request.get(api + 'smsMarketing/dataTotal', {params})
}

// 数据短信营销列表导出
export async function dataListExport(params) {
    return await request.post(api + 'smsMarketing/dataListExport', params)
}

// 数据短信营销取消发送
export async function dataCloseSmsSend(params) {
    return await request.post(api + 'smsMarketing/sendBack', params)
}
// 数据短信营销批量编辑短信
export async function dataBatchEditSms(params) {
    return await request.post(api + 'smsMarketing/dataUpdate', params)
}

// 数据短信营销发送
export async function dataSmsSend(params) {
    return await request.post(api + 'smsMarketing/dataSmsSend', params)
}

// 流量用户短信营销列表
export async function flowList(params) {
    return await request.get(api + 'smsMarketing/flowList', {params})
}

// 流量用户短信营销列表
export async function flowTotal(params) {
    return await request.get(api + 'smsMarketing/flowTotal', {params})
}

// 流量用户短信营销列表导出
export async function flowListExport(params) {
    return await request.post(api + 'smsMarketing/flowListExport', params)
}

// 流量用户短信营销取消发送
export async function flowCloseSmsSend(params) {
    return await request.post(api + 'smsMarketing/flowSendBack', params)
}
// 流量用户批量编辑短信
export async function flowBatchEditSms(params) {
    return await request.post(api + 'smsMarketing/flowUpdate', params)
}
// 流量用户发送短信
export async function flowSmsSend(params) {
    return await request.post(api + 'smsMarketing/flowSmsSend', params)
}

// 共享短信营销列表
export async function sharedList(params) {
    return await request.get(api + 'smsMarketing/sharedList', {params})
}

// 共享短信营销查询总条数
export async function sharedTotal(params) {
    return await request.get(api + 'smsMarketing/sharedTotal', {params})
}

// 共享短信营销列表导出
export async function sharedListExport(params) {
    return await request.post(api + 'smsMarketing/sharedListExport', params)
}

// 共享发送短信取消发送
export async function sharedCloseSmsSend(params) {
    return await request.post(api + 'smsMarketing/sharedSendBack', params)
}
// 共享批量编辑短信
export async function sharedBatchEditSms(params) {
    return await request.post(api + 'smsMarketing/sharedUpdate', params)
}

// 共享发送短信
export async function sharedSmsSend(params) {
    return await request.post(api + 'smsMarketing/sharedSmsSend', params)
}


// 复借短信营销列表导出
export async function reborrowListExport(params) {
    return await request.post(api + 'smsMarketing/reborrowListExport', params)
}

// 复借用户短信营销取消发送
export async function reborrowCloseSmsSend(params) {
    return await request.post(api + 'smsMarketing/reborrowSendBack', params)
}

// 复借短信营销列表
export async function reborrowList(params) {
    return await request.get(api + 'smsMarketing/reborrowList', {params})
}
// 复借批量编辑短信
export async function reborrowBatchEditSms(params) {
    return await request.post(api + 'smsMarketing/reborrowUpdate', params)
}
// 复借发送短信
export async function reborrowSmsSend(params) {
    return await request.post(api + 'smsMarketing/reborrowSmsSend', params)
}

// 复借发送短信条数
export async function reborrowTotal(params) {
    return await request.get(api + 'smsMarketing/reborrowTotal', {params})
}


/**
 * 共享用户营销
 * **/
// 添加备注
export async function shareAddRemarks(params) {
    return await request.post(api + 'shareUserMarket/addRemarks', params)
}

// 所搜调单
export async function shareSearchTransferOrder(params) {
    return await request.post(api + 'shareUserMarket/searchTransferOrder', params)
}

// 所搜调单
export async function shareSelectTransferOrder(params) {
    return await request.post(api + 'shareUserMarket/selectTransferOrder', params)
}

// 代办列表
export async function shareAgencyList(params) {
    return await request.get(api + 'shareUserMarket/agencyList', {params})
}

// 代办列表
export async function shareDoneList(params) {
    return await request.get(api + 'shareUserMarket/doneList', {params})
}

// 全部列表
export async function shareList(params) {
    return await request.get(api + 'shareUserMarket/list', {params})
}

// 营销原因
export async function fetchMarketingCause(params) {
    return await request.get(api + 'shareUserMarket/marketingCause', {params})
}

// 备注列表
export async function shareRemarksList(params) {
    return await request.get(api + 'shareUserMarket/remarksList', {params})
}

// 调单用户列表
export async function shareUserList(params) {
    return await request.get(api + 'shareUserMarket/userList', {params})
}

/**
 *
 * 复借用户营销
 * **/
// 全部列表
export async function reBorrowList(params) {
    return await request.get(api + 'reBorrowUserMarketing/allList', {params})
}

// 待办列表
export async function reBorrowBacklogList(params) {
    return await request.get(api + 'reBorrowUserMarketing/backlogList', {params})
}

// 已办列表
export async function reBorrowHandledList(params) {
    return await request.get(api + 'reBorrowUserMarketing/handledList', {params})
}

// 新增备注
export async function reBorrowInsertRemark(params) {
    return await request.post(api + 'reBorrowUserMarketing/insertRemark', params)
}

// 备注详情
export async function reBorrowRemarkList(params) {
    return await request.get(api + 'reBorrowUserMarketing/remarkList', {params})
}

// 调单列表
export async function reBorrowSingleList(params) {
    return await request.get(api + 'reBorrowUserMarketing/singleList', {params})
}

// 所搜分单
export async function reBorrowSearchTransferOrder(params) {
    return await request.post(api + 'reBorrowUserMarketing/searchedSingle', params)
}

// 所选分单
export async function reBorrowSelectTransferOrder(params) {
    return await request.post(api + 'reBorrowUserMarketing/selectedSingle', params)
}

/**
 *
 * 数据用户营销
 * **/
// 添加数据用户营销备注
export async function dataAddRemark(params) {
    return await request.post(api + 'dataMarketing/addRemark', params)
}

// 所选分单
export async function dataSelectTransferOrder(params) {
    return await request.post(api + 'dataMarketing/chooseAllocation', params)
}

// 所搜分单
export async function dataSearchTransferOrder(params) {
    return await request.post(api + 'dataMarketing/searchAllocation', params)
}

// 全部列表
export async function dataAllList(params) {
    return await request.get(api + 'dataMarketing/allList', {params})
}

// 待办列表
export async function dataBacklogList(params) {
    return await request.get(api + 'dataMarketing/backlogList', {params})
}

// 已办列表
export async function dataDoneList(params) {
    return await request.get(api + 'dataMarketing/doneList', {params})
}

// 数据用户营销备注分页
export async function selectRemarkPage(params) {
    return await request.get(api + 'dataMarketing/selectRemarkPage', {params})
}

// 调单列表
export async function dataSingleList(params) {
    return await request.get(api + 'dataMarketing/singleList', {params})
}


/**
 *
 * 流量用户营销
 * **/

// 添加备注
export async function flowAddRemarks(params) {
    return await request.post(api + 'registerNotApply/addRemarks', params)
}

// 所搜调单
export async function flowSearchTransferOrder(params) {
    return await request.post(api + 'registerNotApply/searchTransferOrder', params)
}

// 所选调单
export async function flowSelectTransferOrder(params) {
    return await request.post(api + 'registerNotApply/selectTransferOrder', params)
}

// 代办列表
export async function flowAgencyList(params) {
    return await request.get(api + 'registerNotApply/agencyList', {params})
}

// 全部列表
export async function flowAllList(params) {
    return await request.get(api + 'registerNotApply/allList', {params})
}

// 已办列表
export async function flowDoneList(params) {
    return await request.get(api + 'registerNotApply/doneList', {params})
}

// 备注列表
export async function flowRemarksList(params) {
    return await request.get(api + 'registerNotApply/remarksList', {params})
}

// 调单用户列表
export async function flowUserList(params) {
    return await request.get(api + 'registerNotApply/userList', {params})
}

/**
 * 转化用户营销
 * **/

// 添加备注
export async function conversionAddRemarks(params) {
    return await request.post(api + 'registerUserMarket/addRemarks', params)
}

// 代办列表
export async function conversionAgencyList(params) {
    return await request.get(api + 'registerUserMarket/agencyList', {params})
}

// 已办列表
export async function conversionDoneList(params) {
    return await request.get(api + 'registerUserMarket/doneList', {params})
}

// 全部列表
export async function conversionAllList(params) {
    return await request.get(api + 'registerUserMarket/list', {params})
}

// 备注列表
export async function conversionRemarksList(params) {
    return await request.get(api + 'registerUserMarket/remarksList', {params})
}

// 调单用户列表
export async function conversionUserList(params) {
    return await request.get(api + 'registerUserMarket/userList', {params})
}

// 所搜调单
export async function conversionSearchTransferOrder(params) {
    return await request.post(api + 'registerUserMarket/searchTransferOrder', params)
}

// 所选调单
export async function conversionSelectTransferOrder(params) {
    return await request.post(api + 'registerUserMarket/selectTransferOrder', params)
}

/**
 * 生成验证码
 * **/
export async function createSendCode(params) {
    return await request.post(api + 'code/sendCode', params)
}

/**
 * 营销配置
 * **/
// 新增员工
export async function marketAddStaff(params) {
    return await request.post(api + 'marketConf/add', params)
}

// 转化用户配置-查询
export async function conversionUserConfigQuery(params) {
    return await request.get(api + 'marketConf/conversionUserConfigQuery', {params})
}

//转化用户配置所搜分单
export async function conversionUserSearchedSingle(params) {
    return await request.post(api + 'marketConf/conversionUserSearchedSingle', params)
}

//转化用户配置所选分单
export async function conversionUserSelectedSingle(params) {
    return await request.post(api + 'marketConf/conversionUserSelectedSingle', params)
}

// 数据用户配置--查询
export async function dataUserConfigQuery(params) {
    return await request.get(api + 'marketConf/dataUserConfigQuery', {params})
}

//数据用户所搜分单
export async function dataUserSearchedSingle(params) {
    return await request.post(api + 'marketConf/dataUserSearchedSingle', params)
}

//数据用户所选分单
export async function dataUserSelectedSingle(params) {
    return await request.post(api + 'marketConf/dataUserSelectedSingle', params)
}

// 解绑员工
export async function marketDeleteStaff(params) {
    return await request.get(api + 'marketConf/delete', {params})
}

// 流量用户配置-查询
export async function flowUserConfigQuery(params) {
    return await request.get(api + 'marketConf/flowUserConfigQuery', {params})
}

//流量用户配置所搜分单
export async function flowUserSearchedSingle(params) {
    return await request.post(api + 'marketConf/flowUserSearchedSingle', params)
}

//流量用户配置所选分单
export async function flowUserSelectedSingle(params) {
    return await request.post(api + 'marketConf/flowUserSelectedSingle', params)
}

// 已绑员工列表
export async function marketBindStaff(params) {
    return await request.get(api + 'marketConf/list', {params})
}

// 复借用户配置--查询
export async function oldUserConfigQuery(params) {
    return await request.get(api + 'marketConf/oldUserConfigQuery', {params})
}

//复借用户所搜分单
export async function oldUserSearchedSingle(params) {
    return await request.post(api + 'marketConf/oldUserSearchedSingle', params)
}

//复借用户所选分单
export async function oldUserSelectedSingle(params) {
    return await request.post(api + 'marketConf/oldUserSelectedSingle', params)
}

// 查询绑定营销人员
export async function selectBindMarketingUser(params) {
    return await request.get(api + 'marketConf/selectBindMarketingUser', {params})
}

//共享用户所搜分单
export async function shareUserSearchedSingle(params) {
    return await request.post(api + 'marketConf/shareUserSearchedSingle', params)
}

//共享用户所选分单
export async function shareUserSelectedSingle(params) {
    return await request.post(api + 'marketConf/shareUserSelectedSingle', params)
}

// 共享用户配置--查询
export async function sharedUserConfigQuery(params) {
    return await request.get(api + 'marketConf/sharedUserConfigQuery', {params})
}

/***
 * 优惠券
 */
// 获取优惠券列表
export async function fetchCouponList(params) {
    return await request.post(api + 'coupon/list', params)
}

// 新增优惠券
export async function addCoupon(params) {
    return await request.post(api + 'coupon/addCoupon', params)
}

// 赠送优惠券
export async function giveCoupon(params) {
    return await request.post(api + 'coupon/giveCoupon', params)
}

// 手动定向发放优惠券列表
export async function manualSendList(params) {
    return await request.post(api + 'coupon/manualSendList', params)
}

// 赠送优惠券/用户查询
export async function fetchUserByPhone(params) {
    return await request.get(api + 'coupon/getUserByPhone', {params})
}

// 优惠券明细/基本信息
export async function couponDetails(params) {
    return await request.get(api + 'coupon/getCoupon', {params})
}

// 优惠券明细/消耗数据
export async function couponConsumeList(params) {
    return await request.post(api + 'coupon/consumeList', params)
}

// 获取赠送优惠券操作人下拉
export async function fetchHandlePersonal(params) {
    return await request.get(api + 'coupon/getUser', {params})
}

// 获取可赠送的优惠券列表
export async function fetchGiveList(params) {
    return await request.post(api + 'coupon/sendList', params)
}

// 编辑/上下架
export async function updateCoupon(params) {
    return await request.post(api + 'coupon/updateCoupon', params)
}

// 获取用户领取明细列表
export async function couponUserDetailsList(params) {
    return await request.post(api + 'coupon/useList', params)
}

// 优惠券核销数据
export async function couponUseData(params) {
    return await request.post(api + 'coupon/verificationList', params)
}

/**
 *  营销报表
 */
// 获取数据营销分时段报表
export async function fetchDataLoanReport(params) {
    return await request.get(api + 'report/dataLoanReport', {params})
}

// 获取数据营销分时段报表合计
export async function fetchDataLoanReportTotal(params) {
    return await request.get(api + 'report/dataLoanReportTotal', {params})
}

// 获取流量营销分时段报表
export async function fetchFlowLoanReport(params) {
    return await request.get(api + 'report/flowLoanReport', {params})
}

// 获取流量营销分时段报表合计
export async function fetchFlowLoanReportTotal(params) {
    return await request.get(api + 'report/flowLoanReportTotal', {params})
}

// 获取复借营销分时段报表
export async function fetchReBorrowLoanReport(params) {
    return await request.get(api + 'report/reBorrowLoanReport', {params})
}

// 获取复借营销分时段报表合计
export async function fetchReBorrowLoanReportTotal(params) {
    return await request.get(api + 'report/reBorrowLoanReportTotal', {params})
}

// 获取共享营销分时段报表
export async function fetchSharedLoanReport(params) {
    return await request.get(api + 'report/sharedLoanReport', {params})
}

// 获取共享营销分时段报表合计
export async function fetchSharedLoanReportTotal(params) {
    return await request.get(api + 'report/sharedLoanReportTotal', {params})
}

// 获取转换营销分时段报表
export async function fetchConversionLoanReport(params) {
    return await request.get(api + 'report/conversionLoanReport', {params})
}

// 获取转换营销分时段报表合计
export async function fetchConversionLoanReportTotal(params) {
    return await request.get(api + 'report/conversionLoanReportTotal', {params})
}

/**
 * 营销 软电话记录
 */
// 添加软电话记录
export async function addMarketPhoneRecord(params) {
    return await request.post(api + 'practicalOperationPoint/add', params)
}
